<%@ include file="header.jsp"%>

<script type="text/javascript">
	$(function() {
		$(".datepicker").datepicker();
		startTime();
		fetchTagsJson('#ul-tags', composeTagList);
		getLatestBlogPostsJson(7, '#ul-new-blogs', blogWithTitleList);
		fetchPopularPosts(6, '#popular-posts');
	})

	function lkupfrmset(n) {
		var optn;
		switch (n) {
		case 0:
			optn = "http://www.aus-emaps.com/ww/weather.php?o=21&c=333333,ffffff";
			break;
		case 1:
			optn = "http://www.aus-emaps.com/pcw/index.php";
			break;
		}
		document.getElementById("lkupfrm").src = optn;
	}
</script>

<aside class="aside-right">
	<section class="calendar">
		<h4 class="side-h4">Time and Calendar:</h4>
		<div id="time"></div>
		<div class="datepicker"></div>
	</section>
	<section>
		<h4 class="side-h4">Weather and Postcode:</h4>

		<div class="weather">
			<iframe id="lkupfrm"
				src="http://www.aus-emaps.com/ww/weather.php?c=333333,ffffff"
				width="200" height="190" frameborder="no" scrolling="no"></iframe>
			<div class="weather-font">
			options: <a onclick="lkupfrmset(0);return false" href="http://www.aus-emaps.com">weather</a> | 
			<a onclick="lkupfrmset(1);return false" href="http://www.aus-emaps.com">postcode finder</a>
			</div>
		</div>
	</section>
	<section class="tags">
		<h4 class="side-h4">Tags:</h4>
		<ul id="ul-tags" class="sidebar-links">
		</ul>
	</section>
	<section class="latest-blogs">
		<h4 class="side-h4">Latest Posts:</h4>
		<ul id="ul-new-blogs" class="sidebar-links">
		</ul>
	</section>
	<section class="most-popular-blogs">
		<h4 class="side-h4">Most Popular Posts:</h4>
		<div id="popular-posts"></div>
	</section>
</aside>